package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;
import org.jsola.hr.constant.PunishTypeEnum;
import org.jsola.hr.constant.RewardTypeEnum;

import java.util.Date;
import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.EmpRewardPunishExample.E_AMOUNT;
import static org.jsola.hr.example.EmpRewardPunishExample.E_COMPANY_ID;
import static org.jsola.hr.example.EmpRewardPunishExample.E_CONTENT;
import static org.jsola.hr.example.EmpRewardPunishExample.E_EMP_ID;
import static org.jsola.hr.example.EmpRewardPunishExample.E_HANDLE_DATE;
import static org.jsola.hr.example.EmpRewardPunishExample.E_PUNISH_TYPE;
import static org.jsola.hr.example.EmpRewardPunishExample.E_REASON;
import static org.jsola.hr.example.EmpRewardPunishExample.E_REMARK;
import static org.jsola.hr.example.EmpRewardPunishExample.E_REWARD_PUNISH;
import static org.jsola.hr.example.EmpRewardPunishExample.E_REWARD_TYPE;
import static org.jsola.hr.example.EmpRewardPunishExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.EmpRewardPunishExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.EmpRewardPunishExample.M_CONTENT_MAX;
import static org.jsola.hr.example.EmpRewardPunishExample.M_EMP_ID_MAX;
import static org.jsola.hr.example.EmpRewardPunishExample.M_EMP_ID_NOT_NULL;
import static org.jsola.hr.example.EmpRewardPunishExample.M_PUNISH_TYPE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpRewardPunishExample.M_REASON_MAX;
import static org.jsola.hr.example.EmpRewardPunishExample.M_REMARK_MAX;
import static org.jsola.hr.example.EmpRewardPunishExample.M_REWARD_TYPE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpRewardPunishExample.N_AMOUNT;
import static org.jsola.hr.example.EmpRewardPunishExample.N_COMPANY_ID;
import static org.jsola.hr.example.EmpRewardPunishExample.N_CONTENT;
import static org.jsola.hr.example.EmpRewardPunishExample.N_EMP_ID;
import static org.jsola.hr.example.EmpRewardPunishExample.N_HANDLE_DATE;
import static org.jsola.hr.example.EmpRewardPunishExample.N_PUNISH_TYPE;
import static org.jsola.hr.example.EmpRewardPunishExample.N_REASON;
import static org.jsola.hr.example.EmpRewardPunishExample.N_REMARK;
import static org.jsola.hr.example.EmpRewardPunishExample.N_REWARD_PUNISH;
import static org.jsola.hr.example.EmpRewardPunishExample.N_REWARD_TYPE;

/**
 * 员工奖惩记录
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【员工奖惩记录】的参数")
@Data
public class EmpRewardPunishUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_EMP_ID, example = E_EMP_ID, required = true)
    @NotNull(message = M_EMP_ID_NOT_NULL)
    @Length(max = 32, message = M_EMP_ID_MAX)
    private String empId;

    @ApiModelProperty(notes = N_REWARD_PUNISH, example = E_REWARD_PUNISH)
    private Integer rewardPunish;

    @ApiModelProperty(notes = N_REWARD_TYPE, example = E_REWARD_TYPE, allowableValues = RewardTypeEnum.VALUES_STR)
    @Const(constClass = RewardTypeEnum.class, message = M_REWARD_TYPE_ENUM_NOT_MATCH)
    private Integer rewardType;

    @ApiModelProperty(notes = N_PUNISH_TYPE, example = E_PUNISH_TYPE, allowableValues = PunishTypeEnum.VALUES_STR)
    @Const(constClass = PunishTypeEnum.class, message = M_PUNISH_TYPE_ENUM_NOT_MATCH)
    private Integer punishType;

    @ApiModelProperty(notes = N_HANDLE_DATE, example = E_HANDLE_DATE)
    private Date handleDate;

    @ApiModelProperty(notes = N_CONTENT, example = E_CONTENT)
    @Length(max = 2000, message = M_CONTENT_MAX)
    private String content;

    @ApiModelProperty(notes = N_AMOUNT, example = E_AMOUNT)
    private Integer amount;

    @ApiModelProperty(notes = N_REASON, example = E_REASON)
    @Length(max = 255, message = M_REASON_MAX)
    private String reason;

    @ApiModelProperty(notes = N_REMARK, example = E_REMARK)
    @Length(max = 255, message = M_REMARK_MAX)
    private String remark;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

